﻿#include "ruleform.h"
#include "ui_ruleform.h"
#include <QDebug>

ruleForm::ruleForm(Rule_t _rule, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ruleForm)
{
    ui->setupUi(this);
    qDebug() << _rule.start_pos << " " << _rule.end_pos << " " << _rule.field_name << " " << _rule.field_type;
    ui->lb_start->setText(QString::number(_rule.start_pos));
    ui->lb_end->setText(QString::number(_rule.end_pos));
    ui->lb_field_name->setText(_rule.field_name);
    ui->lb_field_type->setText(_rule.field_type);
    rule_ = _rule;
}

ruleForm::~ruleForm()
{
    delete ui;
}

Rule_t ruleForm::getRule()
{
    return rule_;
}
